home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / Updates / AWeb3.3 / Install-AWeb33 < prev    next >
Text File  |  2000-05-16  |  17KB  |  687 lines

  1. ; $VER: Install-AWeb33 1.0 (8.10.99)
  2. ; Description: Installer script for AWeb-II 3.0/3.0b/3.1/3.2 -> 3.3 patch
  3.  
  4. (complete 0)
  5.  
  6. (set #welcome
  7.    (cat "This installation procedure installs the AWeb-II 3.3 patch on your system.\n\n"
  8.         "You must have installed AWeb-II 3.2 previously.\n\n"
  9.         "You will need the original AWeb-II 3.x disks for this installation procedure."
  10.    )
  11. )
  12.  
  13. (set #no-aweb3 
  14.    (cat "AWeb3: assign not found.\nYou haven't properly installed AWeb-II 3.2.\n\n"
  15.         "The AWeb-II 3.3 patch is not applied."
  16.    )
  17. )
  18.  
  19. (set #no-aweb32
  20.    (cat "The current version of AWeb-II is not 3.2.\n\n"
  21.         "This patch can only be applied if you upgrade to version 3.2 first.\n\n"
  22.         "Installation procedure terminated."
  23.    )
  24. )
  25.  
  26. (set #checksum-msg
  27.    "Checking version of currently installed files. This will take a few seconds."
  28. )
  29.  
  30. (set #checksum-error
  31.    (cat "Invalid checksum for file %s\n\n"
  32.         "You can apply this patch only to a complete AWeb-II version 3.2 installation."
  33.    )
  34. )
  35.  
  36. (set #checksum-error1
  37.    "Could not discover the version of your release disks."
  38. )
  39.  
  40. (set #already-aweb33
  41.    "It seems that you already have installed AWeb-II version 3.3 or later."
  42. )
  43.  
  44. (set #restore-msg
  45.    (cat "\n\nYou may see this message because a previous upgrade attempt already "
  46.         "changed some files. In that case, you will have to copy all files in "
  47.         "the \"AWeb33Backup\" drawer back to the AWeb-II drawer. Then start the "
  48.         "installation program again."
  49.    )
  50. )
  51.  
  52. (set #languages-prompt
  53.    "Please select which language catalog(s) you want to install"
  54. )
  55.  
  56. (set #backup-prompt
  57.    "Select a location on your hard disk where the backup drawer should be created."
  58. )
  59.  
  60. (set #backup-help
  61.    (cat "A backup will be made of the files in your AWeb-II drawer that are about "
  62.         "to be changed. You will need this backup in case this installation program "
  63.         "fails for any reason.\n\n"
  64.         "Select the location where a \"AWeb32Backup\" drawer should be created. "
  65.         "About 1 MB of free space is needed here. Make sure this location is on "
  66.         "a permanent storage like your hard disk, not in RAM.\n\n"
  67.         "If the installation is successful, you have the option to remove the backup "
  68.         "drawer.\n\n"
  69.    )
  70. )
  71.  
  72. (set #insert-disk
  73.    "Please insert disk 1 of your original AWeb-II distribution (%s) into any drive."
  74. )
  75.  
  76. (set #settingup "Setting up utilities")
  77. (set #patching "Patching %s\n\nBe patient, this can take a while...")
  78. (set #installing "Installing %s")
  79.  
  80. (set #askicons-prompt
  81.    (cat "Do you want to replace the existing icons with new colourful icons "
  82.         "for OS 3.5?\n(This is safe also under earlier versions of the OS)\n\n"
  83.         "WARNING: This will reset all tooltypes to their defaults."
  84.    )
  85. )
  86.  
  87. (set #askicons-help
  88.    (cat "Amiga OS 3.5 supports a new style, colourful icons.\n\n"
  89.         "If you choose Yes, the existing icons for AWeb-II will be replaced by "
  90.         "new, colourful icons. This chioce is recommended if you have installed, "
  91.         "or plan to install, Amiga OS 3.5. Under older versions of the OS, the "
  92.         "old icon images are shown.\n"
  93.         "All tooltypes will be reset to their defaults if you choose Yes.\n\n"
  94.         "If you chooise No, no changes are made to your icons."
  95.    )
  96. )
  97.  
  98. (set #delbackup-prompt
  99.    (cat "Installation of the AWeb 3.3 patch is successfully completed. The backup "
  100.         "drawer that was created earlier, is now no longer needed.\n"
  101.         "Do you want to delete this backup drawer?"
  102.    )
  103. )
  104.  
  105. (set #delbackup-help
  106.    (cat "If you choose Yes, the drawer \"AWeb32Backup\" and all its contents "
  107.         "will be deleted from your hard disk. That will save about 1 MB disk space, "
  108.         "but it will be impossible for you to revert to AWeb-II version 3.2 should "
  109.         "that be necessary.\n\n"
  110.         "If you choose No, the drawer \"AWeb32Backup\" will remain on your hard disk. "
  111.         "Because these files are no longer needed by this installation program, "
  112.         "it is safe to delete this drawer at any time."
  113.    )
  114. )
  115.  
  116. (set #ready
  117.    (cat "Installation of AWeb-II 3.2 -> 3.3 patch complete."
  118.    )
  119. )
  120.  
  121. ;==============================================================================
  122.  
  123. ;---- Procedure to make Installer-type version number ----
  124.  
  125. (procedure P_version #p_ver #p_rev
  126.    (+ (* #p_ver 65536) #p_rev)
  127. )
  128.  
  129. ;---- Procedure to check the checksum for one file ----
  130. ; Continues quietly if a file doesn't exist. User may have deleted
  131. ; (aweblib) files not actually used and possibly quite hard to restore
  132. ; (needing original install + several upgrades).
  133. ; That file won't be upgraded, but since it wasn't there in the first
  134. ; place that won't harm.
  135.  
  136. (procedure P_checksum #pc_file #pc_sum
  137.  
  138.    (set #v_file (tackon @default-dest #pc_file))
  139.    
  140.    (if
  141.       (exists #v_file)
  142.       ;then
  143.       (
  144.          (if
  145.             (<> #pc_sum (getsum (tackon @default-dest #pc_file)))
  146.             ;then
  147.             (
  148.                (abort (cat (#checksum-error #pc_file) #restore-msg))
  149.             )
  150.          )
  151.       )
  152.    )
  153. )
  154.  
  155. ;---- Procedure to check current version ----
  156. ; for some reason (getversion) returns rubbish for all files except AWeb-II
  157. ; so that can't be used.
  158.  
  159. (procedure P_checkversion
  160.  
  161.    (set #v_version (getversion (tackon @default-dest "AWeb-II")))
  162.    
  163.    (if
  164.       (< #v_version (P_version 3 2))
  165.       ;then
  166.       (
  167.          (abort #no-aweb32)
  168.       )
  169.    )
  170.    
  171.    (if
  172.       (= #v_version (P_version 3 2))
  173.       ;then
  174.       (
  175.          (working #checksum-msg)
  176.          (P_checksum "AWebCfg" -1749816972)
  177.          (P_checksum "AWebJS" -905258156)
  178.          (P_checksum "aweblib/awebjs.aweblib" -340584360)
  179.          (P_checksum "aweblib/arexx.aweblib" -1751740796)
  180.          (P_checksum "aweblib/authorize.aweblib" -1936404750)
  181.          (P_checksum "aweblib/cachebrowser.aweblib" 1706508428)
  182.          (P_checksum "aweblib/ftp.aweblib" 1485045243)
  183.          (P_checksum "aweblib/gopher.aweblib" -811933676)
  184.          (P_checksum "aweblib/history.aweblib" -1301673571)
  185.          (P_checksum "aweblib/hotlist.aweblib" 402358834)
  186.          (P_checksum "aweblib/mail.aweblib" -723787522)
  187. ; User may not have installed the second version of news.aweblib
  188.          (P_checksum "aweblib/startup.aweblib" 1823363188)
  189.       )
  190.       ;else
  191.       (
  192.          (abort (cat #already-aweb33 #restore-msg))
  193.       )
  194.    )
  195. )
  196.  
  197. ;---- Procedure to make the backup ----
  198.  
  199. (procedure P_backup
  200.  
  201.    (set #backupparent
  202.       (askdir
  203.          (prompt #backup-prompt)
  204.          (help (cat #backup-help @askdir-help))
  205.          (default @default-dest)
  206.       )
  207.    )
  208.    
  209.    (set #backupdir
  210.       (tackon #backupparent "AWeb32Backup")
  211.    )
  212.    (makedir (#backupdir))
  213.    
  214.    (copyfiles
  215.       (source @default-dest)
  216.       (dest #backupdir)
  217.       (choices "AWeb-II" "AWebCfg" "AWebJS" "aweblib")
  218.    )
  219. )
  220.  
  221. ;---- Procedure to ask for release disk #1 ----
  222. ; We don't know the name on beforehand, so check for all
  223. ; possible names.
  224.  
  225. (procedure P_askdisk
  226.  
  227.    (until #v_ok
  228.       (
  229.          (if
  230.             (exists "AWeb3.0_Disk1:" (noreq))
  231.             ;then
  232.             (
  233.                (set #v_ok 1)
  234.                (set #fromdisk "AWeb3.0_Disk1")
  235.             )
  236.          )
  237.          (if
  238.             (exists "AWeb3.1_Disk1:" (noreq))
  239.             ;then
  240.             (
  241.                (set #v_ok 1)
  242.                (set #fromdisk "AWeb3.1_Disk1")
  243.             )
  244.          )
  245.          (if
  246.             (exists "AWeb3.2_Disk1:" (noreq))
  247.             ;then
  248.             (
  249.                (set #v_ok 1)
  250.                (set #fromdisk "AWeb3.2_Disk1")
  251.             )
  252.          )
  253.          (if
  254.             (= #v_ok 0)
  255.             ;then
  256.             (message (#insert-disk "named like AWeb3.X_Disk1"))
  257.          )
  258.       )
  259.    )
  260.  
  261.    ; And now make sure it is a disk, not an assign:
  262.    
  263.    (askdisk
  264.       (prompt (#insert-disk #fromdisk))
  265.       (help @askdisk-help)
  266.       (dest #fromdisk)
  267.    )
  268. )
  269.  
  270. ;---- Procedure to get language name by number ----
  271.  
  272. (procedure P_langname #p_nr
  273.  
  274.    (select #p_nr
  275.       "English"      ; 0
  276.       "Català"       ; 1
  277.       "Czech"        ; 2
  278.       "Dansk"        ; 3
  279.       "Deutsch"      ; 4
  280.       "Español"      ; 5
  281.       "Français"     ; 6
  282.       "Hrvatski"     ; 7
  283.       "Italiano"